package com.ygqh.baby.po;

import com.ygqh.baby.ao.DataStatus;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class YgProductBook implements Serializable {
    private Long id;

    private String bookName;

    private Date bookStartTime;

    private Date bookEndTime;

    private Date tailMoneyStartTime;

    private Date tailMoneyEndTime;

    private BigDecimal bookMoney;

    private BigDecimal deductibleMoney;

    private DataStatus status;

    private Date createTime;

    private String createBy;

    private Date updateTime;

    private String updateBy;
    List<YgProductBookDetail> productBookDetails;
    

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName == null ? null : bookName.trim();
    }

    public Date getBookStartTime() {
        return bookStartTime;
    }

    public void setBookStartTime(Date bookStartTime) {
        this.bookStartTime = bookStartTime;
    }

    public Date getBookEndTime() {
        return bookEndTime;
    }

    public void setBookEndTime(Date bookEndTime) {
        this.bookEndTime = bookEndTime;
    }

    public Date getTailMoneyStartTime() {
        return tailMoneyStartTime;
    }

    public void setTailMoneyStartTime(Date tailMoneyStartTime) {
        this.tailMoneyStartTime = tailMoneyStartTime;
    }

    public Date getTailMoneyEndTime() {
        return tailMoneyEndTime;
    }

    public void setTailMoneyEndTime(Date tailMoneyEndTime) {
        this.tailMoneyEndTime = tailMoneyEndTime;
    }

    public BigDecimal getBookMoney() {
        return bookMoney;
    }

    public void setBookMoney(BigDecimal bookMoney) {
        this.bookMoney = bookMoney;
    }

    public BigDecimal getDeductibleMoney() {
        return deductibleMoney;
    }

    public void setDeductibleMoney(BigDecimal deductibleMoney) {
        this.deductibleMoney = deductibleMoney;
    }

    

    public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}

	public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

	public List<YgProductBookDetail> getProductBookDetails() {
		return productBookDetails;
	}

	public void setProductBookDetails(List<YgProductBookDetail> productBookDetails) {
		this.productBookDetails = productBookDetails;
	}

    public boolean inValidBookTime(Date date) {
        if (date.compareTo(this.bookStartTime) >= 0 && date.compareTo(this.bookEndTime) <= 0 ) {
            return true;
        }
        return false;
    }

    public boolean inValidTailTime(Date date) {
        if (date.compareTo(this.tailMoneyStartTime) >= 0 && date.compareTo(this.tailMoneyEndTime) <= 0) {
            return true;
        }
        return false;
    }
}